package cn.wolfcode.service;

import cn.wolfcode.domain.Employee;
import cn.wolfcode.qo.QueryObject;
import com.github.pagehelper.PageInfo;
import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.annotation.MultipartConfig;
import java.util.HashMap;
import java.util.List;

public interface IEmployeeService {
    void delete(Long id);

    void insert(Employee employee,Long[] ids);

    Employee selectByPrimaryKey(Long id);

    List<Employee> selectAll();

    void update(Employee employee,Long[] ids);

    PageInfo<Employee> query(QueryObject qo);

    Employee login(String username,String password);

    List<String> expression(Long id);

    void updatePwd(Employee employee);

    void batchDelete(Long[] ids);

    HashMap checkName(String name, Long id);

    //根据id修改对应的status
    void updateStatus(Long id,boolean status);

    //定义一个方法创建并返回一个excel对象
    Workbook exprotXls();

    //给予一个接收到的文件对象,然后解析它,把数据持久化到数据库
    void importXls(MultipartFile file) throws Exception;

    //根据角色编码查询拥有该角色的员工
    List<Employee>  selectByRole(String...name);

}
